package cn.tedu.autoshow.passport.service;

import cn.tedu.autoshow.commons.pojo.vo.PageData;
import cn.tedu.autoshow.commons.security.LoginPrincipal;
import cn.tedu.autoshow.passport.pojo.entity.AdminRole;
import cn.tedu.autoshow.passport.pojo.param.AdminAddNewParam;
import cn.tedu.autoshow.passport.pojo.param.AdminLoginInfoParam;
import cn.tedu.autoshow.passport.pojo.param.AdminUpdateParam;
import cn.tedu.autoshow.passport.pojo.vo.AdminListItemVO;
import cn.tedu.autoshow.passport.pojo.vo.AdminStandardVO;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Transactional
public interface IAdminService {

    String login(AdminLoginInfoParam adminLoginInfoParam, String remoteAddr, String userAgent);

    void logout(String jwt, LoginPrincipal loginPrincipal);

    void addNew(AdminAddNewParam adminAddNewParam);

    void deleteById(Long id);

    void updateInfoById(Long id, AdminUpdateParam adminUpdateParam);

    void updatePwdById(Long id, String password);

    void updateAvatarById(Long id, String avatar);

    void setEnable(Long id);

    void setDisable(Long id);

    AdminStandardVO getStandardById(Long id);

    PageData<AdminListItemVO> list(Integer pageNum);

    PageData<AdminListItemVO> list(Integer pageNum, Integer pageSize);

    PageData<AdminListItemVO> listUsers(Integer pageNum);

    PageData<AdminListItemVO> listUsers(Integer pageNum, Integer pageSize);
}
